package com.kehutong.wxapi.service;

import com.kehutong.wxapi.request.*;
import com.kehutong.wxapi.response.DepartmentCreateResponse;
import com.kehutong.wxapi.response.DepartmentDeleteResponse;
import com.kehutong.wxapi.response.DepartmentListResponse;
import com.kehutong.wxapi.service.impl.DepartmentServiceImpl;
import org.coraframework.inject.ImplementedBy;

/**
 * 部门管理服务
 */
@ImplementedBy(DepartmentServiceImpl.class)
public interface DepartmentService {
    /**
     * 创建部门
     * 请求地址：https://qyapi.weixin.qq.com/cgi-bin/department/create?access_token=ACCESS_TOKEN
     * @param departmentCreateRequest 创建部门请求对象
     * @return 创建部门响应对象
     * @throws Exception 异常
     */
    DepartmentCreateResponse departmentCreate(DepartmentCreateRequest departmentCreateRequest) throws Exception;

    /**
     * 更新部门
     * 请求地址：https://qyapi.weixin.qq.com/cgi-bin/department/update?access_token=ACCESS_TOKEN
     * @param departmentUpdateRequest 更新部门请求对象
     * @return 更新部门响应对象
     * @throws Exception 异常
     */
    DepartmentUpdateResponse departmentUpdate(DepartmentUpdateRequest departmentUpdateRequest) throws Exception;


    /**
     * 删除部门
     * 请求地址：请求地址：https://qyapi.weixin.qq.com/cgi-bin/department/delete?access_token=ACCESS_TOKEN&id=ID
     * @param departmentDeleteRequest 删除部门请求对象
     * @return 删除部门响应对象
     * @throws Exception 异常
     */
    DepartmentDeleteResponse departmentDelete(DepartmentDeleteRequest departmentDeleteRequest) throws Exception;


    /**
     * 获取部门列表
     * 请求地址：https://qyapi.weixin.qq.com/cgi-bin/department/list?access_token=ACCESS_TOKEN&id=ID
     * @param departmentListRequest 获取部门列表请求对象
     * @return 获取部门列表响应对象
     * @throws Exception 异常
     */
    DepartmentListResponse departmentList(DepartmentListRequest departmentListRequest) throws Exception;


}
